package cn.tedu.baidashi.controller;

import cn.tedu.baidashi.service.Impl.ZoneServiceImpl;
import cn.tedu.baidashi.vo.ZoneVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2022-02-16
 */
@RestController
@RequestMapping("/portal")
public class ZoneController {
    @Autowired
    ZoneServiceImpl zoneService;

    @GetMapping("/{city_name}/zone")
    public List<ZoneVo> getZoneNames(
            @PathVariable String city_name
    ){
        List<ZoneVo> zones=zoneService.getZoneNames(city_name);
        return zones;
    }
}
